package conversion;

import java.util.Date;

public class ConversionTypesExample {

	public void conversionTypes(){
		// convert from int to String
		String variable = String.valueOf(10);
		// convert from double to String
		String variable_two = String.valueOf(Math.PI);
		// convert from boolean to string
		String variable_three = String.valueOf(10 < 20);
		// conver from date to String
		String value_four = String.valueOf(new Date());
		// conversion from String to int
		int value_five = Integer.parseInt("1");
		// conversion from String to float
		float value_six = Float.parseFloat("1.34");
		// conversion from String to double
		double value_seven = Double.parseDouble("127");
		// conversion from double to int
		int i = (int) value_seven;	
	}
}
